package com.cb.spzx.manager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cb.spzx.manager.service.CategoryBrandService;
import com.cb.spzx.manager.mapper.CategoryBrandMapper;
import com.cb.spzx.model.dto.product.CategoryBrandDto;
import com.cb.spzx.model.entity.product.CategoryBrand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【category_brand(分类品牌)】的数据库操作Service实现
* @createDate 2024-04-13 21:05:55
*/
@Service
public class CategoryBrandServiceImpl extends ServiceImpl<CategoryBrandMapper, CategoryBrand> implements CategoryBrandService{

    @Autowired
    private CategoryBrandMapper categoryBrandMapper;

    @Override
    public IPage<CategoryBrand> findByPage(Page<CategoryBrand> categoryBrandPage, CategoryBrandDto categoryBrandDto) {
        return categoryBrandMapper.findByPage(categoryBrandPage,categoryBrandDto);
    }

    @Override
    public void saveCategoryBrand(CategoryBrand categoryBrand) {
        baseMapper.insert(categoryBrand);
    }
}




